/*
 * @Author: fhw
 * @Date: 2022-07-28 17:20:33
 * @LastEditors: fhw
 * @LastEditTime: 2022-07-28 17:27:56
 * @Description:
 */

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { IsNotEmpty, IsDefined, IsString } from 'class-validator'
import { DelteIdDto, PageDto } from '../../common/dto/dto'

export class UpdateCategoryTagDto extends DelteIdDto {
  @IsDefined({ message: '名称不能为空' })
  @IsNotEmpty({ message: '名称不能为空' })
  @IsString({ message: '名称不是String类型' })
  @ApiProperty({
    type: String,
    name: 'name',
    description: '名称',
  })
  public readonly name?: string
}
export class CreateTagDto {
  @IsDefined({ message: '名称不能为空' })
  @IsNotEmpty({ message: '名称不能为空' })
  @IsString({ message: '名称不是String类型' })
  @ApiProperty({
    type: String,
    name: 'name',
    description: '名称',
  })
  public readonly name?: string
}
export class ArticleTagDto extends PageDto {
  @ApiPropertyOptional({
    type: String,
    name: 'name',
    description: '名称',
  })
  public readonly name?: string
}
